package com.automannn.seataSamples.stock.mapper;

import com.automannn.seataSamples.stock.entity.StockPO;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

/**
 * @author automannn
 * @Date 2022/3/24
 */
public interface StockMapper extends BaseMapper<StockPO> {
    /**
     * 扣减商品库存
     * @param commodityCode 商品编号
     * @param count 数量
     * @return 操作影响行数
     */
    int decreaseStock(@Param("commodityCode") String commodityCode,@Param("count") Integer count);
}
